package com.ssj.ssj.util;

import java.util.Base64;

public class B64Util {

  public static  String encodeStr(String str) {
      return Base64.getEncoder().encodeToString(str.getBytes());
  }
  public static String decodeStr (String str) {
    return new String(Base64.getDecoder().decode(str));
  }

  public static void main(String[] args) {
    long l = System.currentTimeMillis();
    String s = decodeStr(encodeStr("123456"));
    System.out.println(s);
    System.out.println(System.currentTimeMillis()-l);
  }
}
